// ------------------------------------------------------------------
// Layout
// ------------------------------------------------------------------

.o-mail-Form-chatter {
    --ChatterTopbar-padding-v: #{map-get($spacers, 2)};
    --ChatterTopbar-padding-left: #{$o-horizontal-padding};
    --ChatterTopbar-padding-right: #{$o-horizontal-padding};

    &.o-aside {
        flex-shrink: 0;
        flex-grow: 1;
        padding: map-get($spacers, 0);
        width: $o-mail-Chatter-minWidth;

        .o-mail-Message.o-not-discussion {
            border-width: $border-width 0;
        }

        .o_ChatterContainer {
            width: auto;
        }
    }

    &.o-isInFormSheetBg {
        margin-left: calc(var(--formView-sheetBg-padding-x) * -1);
        margin-right: calc(var(--formView-sheetBg-padding-x) * -1);
    }

    &:not(.o-aside):not(.o-full-width) .o-mail-Chatter {
        margin-left: auto;
        margin-right: auto;
    }
}

// ------------------------------------------------------------------
// Style
// ------------------------------------------------------------------

.o-mail-Form-chatter {
    display: flex;
    margin: 0 auto;
    padding-bottom: map-get($spacers, 5);
    width: 100%;
}

// FIX to hide chatter in dialogs when they are opened from an action returned by python code
.modal .modal-dialog .o_form_view .o-mail-Form-chatter {
    display: none;
}
